import request from "../request";
import qs from "qs";

// 专题推荐数据
export const recommendSubjectListApi = (
  params: IRecommendListParams
): RSP<IRecommendListData> =>
  request.get("/home/recommendSubject/list", { params });
// 批量操作推荐状态
export const recommendSubjectStatusApi = (params: IRecommendStatus): RSP<{}> =>
  request.post(
    `home/recommendSubject/update/recommendStatus?ids=${params.ids}&recommendStatus=${params.recommendStatus}`)
// 排序
export const recommendSortApi = (params: IRecommendList): RSP<any> =>
  request.post(
    `/home/recommendSubject/update/sort/${params.id}?sort=${params.sort}&id=${params.id}`
  );
// 添加专题数据
export const subjectListApi = (
  params?: IUserListParams
): RSP<IUserListData<ISubjectListData>> =>
  request.get("/subject/list", { params });

export const recommendSubjectCreate = (params: any): RSP<[]> =>
  request.post("/home/recommendSubject/create",  params );
